<?php

	require_once "../PinSQL.obj" ;
	$pinSQL = new PinSQL();
	
	$type = $_POST['type'];
	require_once "Gallery_new.obj";
	include "setupGallery.php"; //creates a $gallery object which we can use for table names and other specifics
  
	$itemID = $_POST["itemid"];
	
	// delete the specified comment
	$commentid = $_POST["commentid"];
	
	mysql_query("DELETE FROM $gallery->commentsTable
	WHERE id = $commentid")
	or die(mysql_error());
	
	include("gen_comments.php");
	
	mysql_close();
?>